package org.jeecg.modules.ec.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * @Description: 紧急联系人（档案信息管理附表）
 * @Author: jeecg-boot
 * @Date:   2025-09-02
 * @Version: V1.0
 */
@Schema(description="紧急联系人（档案信息管理附表）")
@Data
@TableName("ec_emergency_contact")
public class EcEmergencyContact implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private java.lang.String id;
	/**服务商ID*/
    @Schema(description = "服务商ID")
    private java.lang.String serviceProviderId;
	/** 姓名*/
	@Excel(name = " 姓名", width = 15)
    @Schema(description = " 姓名")
    private java.lang.String name;
	/**关系*/
	@Excel(name = "关系", width = 15)
    @Schema(description = "关系")
    private java.lang.String relationship;
	/**手机号*/
	@Excel(name = "手机号", width = 15)
    @Schema(description = "手机号")
    private java.lang.String phone;
	/**地址*/
    @Excel(name = "地址", width = 15,exportConvert=true,importConvert = true )
    @Schema(description = "地址")
    private java.lang.String region;

    public String convertisRegion() {
        return SpringContextUtils.getBean(ProvinceCityArea.class).getText(region);
    }

    public void convertsetRegion(String text) {
        this.region = SpringContextUtils.getBean(ProvinceCityArea.class).getCode(text);
    }
	/**详细地址*/
	@Excel(name = "详细地址", width = 15)
    @Schema(description = "详细地址")
    private java.lang.String address;
	/**创建人*/
    @Schema(description = "创建人")
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建日期")
    private java.util.Date createTime;
	/**更新人*/
    @Schema(description = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新日期")
    private java.util.Date updateTime;
	/**所属部门*/
    @Schema(description = "所属部门")
    private java.lang.String sysOrgCode;
}
